package lmf;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

public class TrackLFM {

	public String name;
	public String duration;
	public String mbid;
	
	public TrackLFM(Node node) {
		if (node.getNodeType() == Node.ELEMENT_NODE) {
			Element element = (Element) node;
			try {
				name = element.getElementsByTagName("name").item(0)
						.getFirstChild().getNodeValue();
			} catch (Exception e) {
				// TODO: handle exception
			}
			try {
				duration = element.getElementsByTagName("duration").item(0)
						.getFirstChild().getNodeValue();
			} catch (Exception e) {
				// TODO: handle exception
			}
			try {
				mbid = element.getElementsByTagName("mbid").item(0)
						.getFirstChild().getNodeValue();
			} catch (Exception e) {
				// TODO: handle exception
			}
		}
	}

}
